﻿using System;

using UFrame.BridgeUI;

using UnityEngine;

///*************************************************************************************
///* 作    者：       zouhunter
///* 创建时间：       2021-06-05 06:03:09
///* 说    明：       1.此代码由工具生成
///                   2.不支持编写的代码
///                   3.请使用继承方式使用
///* ************************************************************************************/
namespace GView
{
    /// <summary>
    /// 模板方法
    /// <summary>
    public abstract class MainPanelInternal : ViewBase
    {
        protected MainPanelReference binding;

        /// <summary>
        /// 绑定
        /// </summary>
        protected override void OnBinding(UnityEngine.GameObject target)
        {
            base.OnBinding(target);
            binding = target.GetComponent<MainPanelReference>();
            if (binding != null)
            {
                binding.ImportBtn.onClick.AddListener(OnImportBtnClick);
                binding.ImportIcon.onClick.AddListener(OnImportIcon);
                binding.CreateBtn.onClick.AddListener(OnCreateClick);
                binding.SettingBtn.onClick.AddListener(OnSettingBtnClick);
                binding.SearchBtn.onClick.AddListener(OnSearchBtnClick);
                binding.RefreshBtn.onClick.AddListener(OnRefreshBtnClick);
                binding.SearchInput.onEndEdit.AddListener(OnSearchInputEndEdit);
                binding.deleteBtn.onClick.AddListener(OndeleteBtnClick);
                binding.editInfoBtn.onClick.AddListener(OnEditInfoClick);
                binding.openFolder.onClick.AddListener(OnopenFolderClick);
                binding.exportBtn.onClick.AddListener(OnexportBtnClick);
                binding.NameInput.onEndEdit.AddListener(OnNameInputEndEdit);
                binding.DescInput.onEndEdit.AddListener(OnDescInputEndEdit);
                binding.TagsInput.onEndEdit.AddListener(OnTagsInputEnd);
                binding.Apply.onClick.AddListener(OnApplyClick);
                binding.settingApplayBtn.onClick.AddListener(OnsettingApplayBtnClick);
                binding.filePathApplyBtn.onClick.AddListener(OnfilePathApplyBtnClick);
                binding.sizeViewSlider.onValueChanged.AddListener(OnsizeViewSliderChanged);
                binding.ClearEmptyBtn.onClick.AddListener(OnClearEmptyBtnClick);
                binding.listOrGridTog.onValueChanged.AddListener(OnlistOrGridTogChanged);
                RegistUIControl(binding.TypeList);
                RegistUIControl(binding.SourceListSelector);
                RegistUIControl(binding.FileListContent);
                RegistUIControl(binding.FileListContent2);
            }
        }

        /// <summary>
        /// 解绑定
        /// </summary>
        protected override void OnUnBinding()
        {
            if (binding != null)
            {
                binding.ImportBtn.onClick.RemoveListener(OnImportBtnClick);
                binding.ImportIcon.onClick.RemoveListener(OnImportIcon);
                binding.CreateBtn.onClick.RemoveListener(OnCreateClick);
                binding.SettingBtn.onClick.RemoveListener(OnSettingBtnClick);
                binding.SearchBtn.onClick.RemoveListener(OnSearchBtnClick);
                binding.RefreshBtn.onClick.RemoveListener(OnRefreshBtnClick);
                binding.SearchInput.onEndEdit.RemoveListener(OnSearchInputEndEdit);
                binding.deleteBtn.onClick.RemoveListener(OndeleteBtnClick);
                binding.editInfoBtn.onClick.RemoveListener(OnEditInfoClick);
                binding.openFolder.onClick.RemoveListener(OnopenFolderClick);
                binding.exportBtn.onClick.RemoveListener(OnexportBtnClick);
                binding.NameInput.onEndEdit.RemoveListener(OnNameInputEndEdit);
                binding.DescInput.onEndEdit.RemoveListener(OnDescInputEndEdit);
                binding.TagsInput.onEndEdit.RemoveListener(OnTagsInputEnd);
                binding.Apply.onClick.RemoveListener(OnApplyClick);
                binding.settingApplayBtn.onClick.RemoveListener(OnsettingApplayBtnClick);
                binding.filePathApplyBtn.onClick.RemoveListener(OnfilePathApplyBtnClick);
                binding.sizeViewSlider.onValueChanged.RemoveListener(OnsizeViewSliderChanged);
                binding.ClearEmptyBtn.onClick.RemoveListener(OnClearEmptyBtnClick);
                binding.listOrGridTog.onValueChanged.RemoveListener(OnlistOrGridTogChanged);
            }
            base.OnUnBinding();
        }

        #region BindingProps
        protected UnityEngine.UI.Button ImportBtn
        {
            get
            {
                if (binding != null)
                {
                    return binding.ImportBtn;
                }
                return null;
            }
        }
        protected UnityEngine.UI.Text StateText
        {
            get
            {
                if (binding != null)
                {
                    return binding.StateText;
                }
                return null;
            }
        }
        protected UnityEngine.UI.Button ImportIcon
        {
            get
            {
                if (binding != null)
                {
                    return binding.ImportIcon;
                }
                return null;
            }
        }
        protected UFrame.BridgeUI.Common.ToggleListSelector TypeList
        {
            get
            {
                if (binding != null)
                {
                    return binding.TypeList;
                }
                return null;
            }
        }
        protected UnityEngine.UI.Button CreateBtn
        {
            get
            {
                if (binding != null)
                {
                    return binding.CreateBtn;
                }
                return null;
            }
        }
        protected UnityEngine.GameObject ResListContent
        {
            get
            {
                if (binding != null)
                {
                    return binding.ResListContent;
                }
                return null;
            }
        }
        protected UnityEngine.UI.Button SettingBtn
        {
            get
            {
                if (binding != null)
                {
                    return binding.SettingBtn;
                }
                return null;
            }
        }
        protected UnityEngine.UI.Button SearchBtn
        {
            get
            {
                if (binding != null)
                {
                    return binding.SearchBtn;
                }
                return null;
            }
        }
        protected UnityEngine.UI.Button RefreshBtn
        {
            get
            {
                if (binding != null)
                {
                    return binding.RefreshBtn;
                }
                return null;
            }
        }
        protected UnityEngine.UI.InputField SearchInput
        {
            get
            {
                if (binding != null)
                {
                    return binding.SearchInput;
                }
                return null;
            }
        }
        protected UnityEngine.GameObject SettingPanel
        {
            get
            {
                if (binding != null)
                {
                    return binding.SettingPanel;
                }
                return null;
            }
        }
        protected UnityEngine.GameObject EditPanel
        {
            get
            {
                if (binding != null)
                {
                    return binding.EditPanel;
                }
                return null;
            }
        }
        protected UnityEngine.UI.Button deleteBtn
        {
            get
            {
                if (binding != null)
                {
                    return binding.deleteBtn;
                }
                return null;
            }
        }
        protected UnityEngine.UI.Text DesInfo
        {
            get
            {
                if (binding != null)
                {
                    return binding.DesInfo;
                }
                return null;
            }
        }
        protected UnityEngine.UI.Text NameInfo
        {
            get
            {
                if (binding != null)
                {
                    return binding.NameInfo;
                }
                return null;
            }
        }
        protected UnityEngine.UI.Button editInfoBtn
        {
            get
            {
                if (binding != null)
                {
                    return binding.editInfoBtn;
                }
                return null;
            }
        }
        protected UnityEngine.UI.Button openFolder
        {
            get
            {
                if (binding != null)
                {
                    return binding.openFolder;
                }
                return null;
            }
        }
        protected UnityEngine.UI.Button exportBtn
        {
            get
            {
                if (binding != null)
                {
                    return binding.exportBtn;
                }
                return null;
            }
        }
        protected UnityEngine.UI.InputField NameInput
        {
            get
            {
                if (binding != null)
                {
                    return binding.NameInput;
                }
                return null;
            }
        }
        protected UnityEngine.UI.InputField DescInput
        {
            get
            {
                if (binding != null)
                {
                    return binding.DescInput;
                }
                return null;
            }
        }
        protected UnityEngine.UI.InputField TagsInput
        {
            get
            {
                if (binding != null)
                {
                    return binding.TagsInput;
                }
                return null;
            }
        }
        protected UnityEngine.UI.Button TypeBtn
        {
            get
            {
                if (binding != null)
                {
                    return binding.TypeBtn;
                }
                return null;
            }
        }
        protected UnityEngine.UI.Text TypeInfoText
        {
            get
            {
                if (binding != null)
                {
                    return binding.TypeInfoText;
                }
                return null;
            }
        }
        protected UnityEngine.UI.Button Apply
        {
            get
            {
                if (binding != null)
                {
                    return binding.Apply;
                }
                return null;
            }
        }
        protected UFrame.BridgeUI.Common.ToggleListSelector SourceListSelector
        {
            get
            {
                if (binding != null)
                {
                    return binding.SourceListSelector;
                }
                return null;
            }
        }
        protected UFrame.BridgeUI.Common.ListViewer FileListContent
        {
            get
            {
                if (binding != null)
                {
                    return binding.FileListContent;
                }
                return null;
            }
        }
        protected UnityEngine.UI.Dropdown ImportMode
        {
            get
            {
                if (binding != null)
                {
                    return binding.ImportMode;
                }
                return null;
            }
        }
        protected UnityEngine.UI.InputField layerNameInput
        {
            get
            {
                if (binding != null)
                {
                    return binding.layerNameInput;
                }
                return null;
            }
        }
        protected UnityEngine.UI.InputField importPathInput
        {
            get
            {
                if (binding != null)
                {
                    return binding.importPathInput;
                }
                return null;
            }
        }
        protected UnityEngine.UI.Button settingApplayBtn
        {
            get
            {
                if (binding != null)
                {
                    return binding.settingApplayBtn;
                }
                return null;
            }
        }
        protected UnityEngine.UI.InputField filePathInputField
        {
            get
            {
                if (binding != null)
                {
                    return binding.filePathInputField;
                }
                return null;
            }
        }
        protected UnityEngine.UI.Button filePathApplyBtn
        {
            get
            {
                if (binding != null)
                {
                    return binding.filePathApplyBtn;
                }
                return null;
            }
        }
        protected UnityEngine.UI.Text filePathText
        {
            get
            {
                if (binding != null)
                {
                    return binding.filePathText;
                }
                return null;
            }
        }
        protected UnityEngine.UI.Text fileCountText
        {
            get
            {
                if (binding != null)
                {
                    return binding.fileCountText;
                }
                return null;
            }
        }
        protected UnityEngine.UI.Slider sizeViewSlider
        {
            get
            {
                if (binding != null)
                {
                    return binding.sizeViewSlider;
                }
                return null;
            }
        }
        protected UnityEngine.UI.Button ClearEmptyBtn
        {
            get
            {
                if (binding != null)
                {
                    return binding.ClearEmptyBtn;
                }
                return null;
            }
        }
        protected UnityEngine.UI.Text searchNumText
        {
            get
            {
                if (binding != null)
                {
                    return binding.searchNumText;
                }
                return null;
            }
        }
        protected UnityEngine.GameObject LoadingPanel
        {
            get
            {
                if (binding != null)
                {
                    return binding.LoadingPanel;
                }
                return null;
            }
        }
        protected UnityEngine.UI.Text LoadingDetail
        {
            get
            {
                if (binding != null)
                {
                    return binding.LoadingDetail;
                }
                return null;
            }
        }
        protected UnityEngine.UI.Slider ProgressSlider
        {
            get
            {
                if (binding != null)
                {
                    return binding.ProgressSlider;
                }
                return null;
            }
        }
        protected UFrame.BridgeUI.Common.ListViewer FileListContent2
        {
            get
            {
                if (binding != null)
                {
                    return binding.FileListContent2;
                }
                return null;
            }
        }
        protected UnityEngine.UI.Toggle listOrGridTog
        {
            get
            {
                if (binding != null)
                {
                    return binding.listOrGridTog;
                }
                return null;
            }
        }
        protected UnityEngine.UI.ScrollRect DetailScrollView
        {
            get
            {
                if (binding != null)
                {
                    return binding.DetailScrollView;
                }
                return null;
            }
        }
        protected UnityEngine.UI.Toggle DeepTog
        {
            get
            {
                if (binding != null)
                {
                    return binding.DeepTog;
                }
                return null;
            }
        }
        protected UnityEngine.CanvasGroup RightGroup
        {
            get
            {
                if (binding != null)
                {
                    return binding.RightGroup;
                }
                return null;
            }
        }
        #endregion BindingProps
        #region Set_Functions
        protected void Settext(System.String text)
        {
            if (binding)
            {
                if (binding.NameInput != null)
                {
                    binding.NameInput.text = text;
                }
            }
        }
        #endregion Set_Functions

        #region Virtual_Functions
        protected virtual void OnImportBtnClick() { }
        protected virtual void OnImportIcon() { }
        protected virtual void OnCreateClick() { }
        protected virtual void OnSettingBtnClick() { }
        protected virtual void OnSearchBtnClick() { }
        protected virtual void OnRefreshBtnClick() { }
        protected virtual void OnSearchInputEndEdit(System.String arg0) { }
        protected virtual void OndeleteBtnClick() { }
        protected virtual void OnEditInfoClick() { }
        protected virtual void OnopenFolderClick() { }
        protected virtual void OnexportBtnClick() { }
        protected virtual void OnNameInputEndEdit(System.String arg0) { }
        protected virtual void OnDescInputEndEdit(System.String arg0) { }
        protected virtual void OnTagsInputEnd(System.String arg0) { }
        protected virtual void OnApplyClick() { }
        protected virtual void OnsettingApplayBtnClick() { }
        protected virtual void OnfilePathApplyBtnClick() { }
        protected virtual void OnsizeViewSliderChanged(System.Single arg0) { }
        protected virtual void OnClearEmptyBtnClick() { }
        protected virtual void OnlistOrGridTogChanged(System.Boolean arg0) { }
        #endregion Virtual_Functions
    }
}
